﻿using StoreProject.DAL;
using StoreProject.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StoreProject.BLL
{
    public class ChangefulBLL
    {
        ChangefulDAL _dal = new ChangefulDAL();
        public bool Update(ChangefulEntity model)
        {
            bool res = false;
            int result = _dal.Update(model);
            res = (int)result > 0;
            return res;
        }

        public bool Delete(string id)
        {
            bool res = false;
            int result = _dal.Delete(id);
            res = (int)result > 0;
            return res;
        }

        public bool Delete(ChangefulEntity model)
        {
            bool res = false;
            int result = _dal.Delete(model);
            res = (int)result > 0;
            return res;
        }

        public ChangefulEntity Get(string id)
        {
            return _dal.Get(id);
        }

        public IEnumerable<ChangefulEntity> GetList()
        {
            return _dal.GetList();
        }

        public IEnumerable<ChangefulEntity> GetListEx()
        {
            return _dal.GetListEx();
        }
    }
}
